oracle.pg.nosql

## Class OracleVertex

- java.lang.Object
- - oracle.pg.nosql.OracleElement
  - - oracle.pg.nosql.OracleVertex

- All Implemented Interfaces:
    Element, Vertex, OracleElementBase, OracleVertexBase

      public class OracleVertex
      extends OracleElement
      implements OracleVertexBase

  This class implements the Blueprints Vertex interface on top of the supported backend database.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Edge` | `addEdge(String label, Vertex inVertex)` This method adds an outgoing edge from this vertex to the inVertex with the provided edge label
    `boolean` | `equals(Object o)` This method returns true if the current OracleVertex instance is considered equal to the given OracleVertex instance
    `void` | `forceRefresh()` Physically refresh this Vertex instance by reading from the underlying database
    `long` | `getDegree(Direction direction, String... labels)` Get the vertex degree according to the provided direction and edge labels
    `Iterable<Edge>` | `getEdges(Direction direction, String... labels)` Return the edges incident to the vertex according to the given direction and edge labels.
    `static OracleVertex` | `getInstance(OraclePropertyGraph opg, Long vid)` Returns an instance of OracleVertex
    `static OracleVertex` | `getInstance(OraclePropertyGraph opg, Long vid, boolean bCreateIfAbsentFromCache)` Returns an instance of OracleVertex.
    `static OracleVertex` | `getInstance(OraclePropertyGraph opg, Long vid, boolean bCreateIfAbsentFromCache, boolean bSkipStoreToCache)` Returns an instance of OracleVertex.
    `Iterable<Vertex>` | `getVertices(Direction direction, String... labels)` Return the vertices adjacent to the vertex accordng to the provided direction and edge labels
    `int` | `hashCode()` This method returns the hash code
    `VertexQuery` | `query()` Generate a query object that can be used to fine tune which edges/vertices are retrieved that are incident/adjacent to this vertex.
    `void` | `remove()` This method removes this vertex from its container grpah
    `String` | `toString()` Returns a String format of the vertex instance.

    - ### Methods inherited from class oracle.pg.nosql.OracleElement

      `getAttributes, getId, getProperty, getPropertyGraph, getPropertyKeys, isPartial, refresh, removeProperty, setPartial, setProperty, setProperty, setProperty, setPropertyCommon`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface oracle.pg.common.OracleElementBase

      `setPartial, setProperty`

    - ### Methods inherited from interface com.tinkerpop.blueprints.Element

      `getId, getProperty, getPropertyKeys, removeProperty, setProperty`

- - ### Method Detail

    - #### addEdge

          public Edge addEdge(String label,
                     Vertex inVertex)

      This method adds an outgoing edge from this vertex to the inVertex with the provided edge label
      Specified by:
        `addEdge` in interface `Vertex`

    - #### equals

          public boolean equals(Object o)

      This method returns true if the current OracleVertex instance is considered equal to the given OracleVertex instance
      Overrides:
        `equals` in class `Object`
      Parameters:
        `o` - an object to compare this vertex against

    - #### forceRefresh

          public void forceRefresh()
                            throws Exception

      Physically refresh this Vertex instance by reading from the underlying database
      Specified by:
        `forceRefresh` in interface `OracleElementBase`
      Specified by:
        `forceRefresh` in class `OracleElement`
      Throws:
        `Exception`

    - #### getDegree

          public long getDegree(Direction direction,
                       String... labels)

      Get the vertex degree according to the provided direction and edge labels
      Parameters:
        `direction` - the direction of the edges of the adjacent vertices
        `labels` - the labels of the edges of the adjacent vertices
      Returns:
        vertex degree

    - #### getEdges

          public Iterable<Edge> getEdges(Direction direction,
                                String... labels)

      Return the edges incident to the vertex according to the given direction and edge labels.
      Specified by:
        `getEdges` in interface `Vertex`

    - #### getInstance

          public static OracleVertex getInstance(OraclePropertyGraph opg,
                                 Long vid)

      Returns an instance of OracleVertex

    - #### getInstance

          public static OracleVertex getInstance(OraclePropertyGraph opg,
                                 Long vid,
                                 boolean bCreateIfAbsentFromCache)

      Returns an instance of OracleVertex. If there is no match in the cache and bCreateIfAbsentFromCache is false, then a NULL value will be returned.

    - #### getInstance

          public static OracleVertex getInstance(OraclePropertyGraph opg,
                                 Long vid,
                                 boolean bCreateIfAbsentFromCache,
                                 boolean bSkipStoreToCache)

      Returns an instance of OracleVertex. If there is no match in the cache and bCreateIfAbsentFromCache is false, then a NULL value will be returned.

    - #### getVertices

          public Iterable<Vertex> getVertices(Direction direction,
                                     String... labels)

      Return the vertices adjacent to the vertex accordng to the provided direction and edge labels
      Specified by:
        `getVertices` in interface `Vertex`
      Parameters:
        `direction` - the direction of the edges of the adjacent vertices
        `labels` - the labels of the edges of the adjacent vertices
      Returns:
        an iterable of adjacent vertices

    - #### hashCode

          public int hashCode()

      This method returns the hash code
      Overrides:
        `hashCode` in class `Object`

    - #### query

          public VertexQuery query()

      Generate a query object that can be used to fine tune which edges/vertices are retrieved that are incident/adjacent to this vertex.
      Specified by:
        `query` in interface `Vertex`

    - #### remove

          public void remove()

      This method removes this vertex from its container grpah
      Specified by:
        `remove` in interface `Element`

    - #### toString

          public String toString()

      Returns a String format of the vertex instance.
      Overrides:
        `toString` in class `Object`

Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.